<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FabGL: Keyboard Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">FabGL
   </div>
   <div id="projectbrief">ESP32 Display Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classfabgl_1_1_keyboard.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classfabgl_1_1_keyboard-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">Keyboard Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>The PS2 <a class="el" href="classfabgl_1_1_keyboard.html" title="The PS2 Keyboard controller class.">Keyboard</a> controller class.  
 <a href="classfabgl_1_1_keyboard.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="keyboard_8h_source.html">keyboard.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Keyboard:</div>
<div class="dyncontent">
<div class="center"><img src="classfabgl_1_1_keyboard__inherit__graph.png" border="0" usemap="#a_keyboard_inherit__map" alt="Inheritance graph"/></div>
<map name="a_keyboard_inherit__map" id="a_keyboard_inherit__map">
<area shape="rect" title="The PS2 Keyboard controller class." alt="" coords="11,80,88,107"/>
<area shape="rect" href="classfabgl_1_1_p_s2_device.html" title="Base class for PS2 devices (like mouse or keyboard)." alt="" coords="5,5,93,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a387c13d2b898fc5f2ce94cadf693fd2c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a387c13d2b898fc5f2ce94cadf693fd2c.html#a387c13d2b898fc5f2ce94cadf693fd2c">begin</a> (bool generateVirtualKeys, bool createVKQueue, int PS2Port)</td></tr>
<tr class="memdesc:a387c13d2b898fc5f2ce94cadf693fd2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes <a class="el" href="classfabgl_1_1_keyboard.html" title="The PS2 Keyboard controller class.">Keyboard</a> without initializing the PS/2 controller.  <a href="classfabgl_1_1_keyboard_a387c13d2b898fc5f2ce94cadf693fd2c.html#a387c13d2b898fc5f2ce94cadf693fd2c">More...</a><br /></td></tr>
<tr class="separator:a387c13d2b898fc5f2ce94cadf693fd2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f1c6a36aae1c88e57c6bc7e05c772d1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a4f1c6a36aae1c88e57c6bc7e05c772d1.html#a4f1c6a36aae1c88e57c6bc7e05c772d1">begin</a> (gpio_num_t clkGPIO, gpio_num_t dataGPIO, bool generateVirtualKeys=true, bool createVKQueue=true)</td></tr>
<tr class="memdesc:a4f1c6a36aae1c88e57c6bc7e05c772d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes <a class="el" href="classfabgl_1_1_keyboard.html" title="The PS2 Keyboard controller class.">Keyboard</a> specifying CLOCK and DATA GPIOs.  <a href="classfabgl_1_1_keyboard_a4f1c6a36aae1c88e57c6bc7e05c772d1.html#a4f1c6a36aae1c88e57c6bc7e05c772d1">More...</a><br /></td></tr>
<tr class="separator:a4f1c6a36aae1c88e57c6bc7e05c772d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefe8cfbbb777abf28e87a1caf05da5e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_aefe8cfbbb777abf28e87a1caf05da5e8.html#aefe8cfbbb777abf28e87a1caf05da5e8">emptyVirtualKeyQueue</a> ()</td></tr>
<tr class="memdesc:aefe8cfbbb777abf28e87a1caf05da5e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empties the virtual keys queue.  <a href="classfabgl_1_1_keyboard_aefe8cfbbb777abf28e87a1caf05da5e8.html#aefe8cfbbb777abf28e87a1caf05da5e8">More...</a><br /></td></tr>
<tr class="separator:aefe8cfbbb777abf28e87a1caf05da5e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3634bbeb8aa072c0d2e6e2c6c1553301"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a3634bbeb8aa072c0d2e6e2c6c1553301.html#a3634bbeb8aa072c0d2e6e2c6c1553301">enableVirtualKeys</a> (bool generateVirtualKeys, bool createVKQueue)</td></tr>
<tr class="memdesc:a3634bbeb8aa072c0d2e6e2c6c1553301"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dynamically enables or disables Virtual Keys generation.  <a href="classfabgl_1_1_keyboard_a3634bbeb8aa072c0d2e6e2c6c1553301.html#a3634bbeb8aa072c0d2e6e2c6c1553301">More...</a><br /></td></tr>
<tr class="separator:a3634bbeb8aa072c0d2e6e2c6c1553301"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed861a34a0b8194ff5eed19088e6e04d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfabgl_1_1_keyboard_layout.html">KeyboardLayout</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_aed861a34a0b8194ff5eed19088e6e04d.html#aed861a34a0b8194ff5eed19088e6e04d">getLayout</a> ()</td></tr>
<tr class="memdesc:aed861a34a0b8194ff5eed19088e6e04d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets current keyboard layout.  <a href="classfabgl_1_1_keyboard_aed861a34a0b8194ff5eed19088e6e04d.html#aed861a34a0b8194ff5eed19088e6e04d">More...</a><br /></td></tr>
<tr class="separator:aed861a34a0b8194ff5eed19088e6e04d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abda5b9383751f677dd50359f5d5e6767"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_abda5b9383751f677dd50359f5d5e6767.html#abda5b9383751f677dd50359f5d5e6767">getLEDs</a> (bool *numLock, bool *capsLock, bool *scrollLock)</td></tr>
<tr class="memdesc:abda5b9383751f677dd50359f5d5e6767"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets keyboard LEDs status.  <a href="classfabgl_1_1_keyboard_abda5b9383751f677dd50359f5d5e6767.html#abda5b9383751f677dd50359f5d5e6767">More...</a><br /></td></tr>
<tr class="separator:abda5b9383751f677dd50359f5d5e6767"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad95b6b1928e6bd2cb5b5e3fb8be11f52"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_ad95b6b1928e6bd2cb5b5e3fb8be11f52.html#ad95b6b1928e6bd2cb5b5e3fb8be11f52">getNextScancode</a> (int timeOutMS=-1, bool requestResendOnTimeOut=false)</td></tr>
<tr class="memdesc:ad95b6b1928e6bd2cb5b5e3fb8be11f52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a scancode from the queue.  <a href="classfabgl_1_1_keyboard_ad95b6b1928e6bd2cb5b5e3fb8be11f52.html#ad95b6b1928e6bd2cb5b5e3fb8be11f52">More...</a><br /></td></tr>
<tr class="separator:ad95b6b1928e6bd2cb5b5e3fb8be11f52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0de31f752f76a296060bc792b51e50ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enumerations_gad0e6e31d5953384be4ea987eb3923e02.html#gad0e6e31d5953384be4ea987eb3923e02">VirtualKey</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a0de31f752f76a296060bc792b51e50ba.html#a0de31f752f76a296060bc792b51e50ba">getNextVirtualKey</a> (bool *keyDown=nullptr, int timeOutMS=-1)</td></tr>
<tr class="memdesc:a0de31f752f76a296060bc792b51e50ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a virtual key from the queue.  <a href="classfabgl_1_1_keyboard_a0de31f752f76a296060bc792b51e50ba.html#a0de31f752f76a296060bc792b51e50ba">More...</a><br /></td></tr>
<tr class="separator:a0de31f752f76a296060bc792b51e50ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d75f8d788d0d853efcd5beafaf378a8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a0d75f8d788d0d853efcd5beafaf378a8.html#a0d75f8d788d0d853efcd5beafaf378a8">getNextVirtualKey</a> (<a class="el" href="structfabgl_1_1_virtual_key_item.html">VirtualKeyItem</a> *item, int timeOutMS=-1)</td></tr>
<tr class="memdesc:a0d75f8d788d0d853efcd5beafaf378a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a virtual key from the queue, including associated scan code.  <a href="classfabgl_1_1_keyboard_a0d75f8d788d0d853efcd5beafaf378a8.html#a0d75f8d788d0d853efcd5beafaf378a8">More...</a><br /></td></tr>
<tr class="separator:a0d75f8d788d0d853efcd5beafaf378a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad71b1d9186542ee488f761280b7b76da"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#gab1e29a3412c837d0e4e7599473e8948f">PS2DeviceType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_ad71b1d9186542ee488f761280b7b76da.html#ad71b1d9186542ee488f761280b7b76da">identify</a> ()</td></tr>
<tr class="memdesc:ad71b1d9186542ee488f761280b7b76da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Identifies the device attached to the PS2 port.  <a href="classfabgl_1_1_p_s2_device_ad71b1d9186542ee488f761280b7b76da.html#ad71b1d9186542ee488f761280b7b76da">More...</a><br /></td></tr>
<tr class="separator:ad71b1d9186542ee488f761280b7b76da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43ee85b9025f15c6edeb7ec670ca535b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a43ee85b9025f15c6edeb7ec670ca535b.html#a43ee85b9025f15c6edeb7ec670ca535b">injectVirtualKey</a> (<a class="el" href="group___enumerations_gad0e6e31d5953384be4ea987eb3923e02.html#gad0e6e31d5953384be4ea987eb3923e02">VirtualKey</a> virtualKey, bool keyDown, bool insert=false)</td></tr>
<tr class="memdesc:a43ee85b9025f15c6edeb7ec670ca535b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds or inserts a virtual key into the virtual keys queue.  <a href="classfabgl_1_1_keyboard_a43ee85b9025f15c6edeb7ec670ca535b.html#a43ee85b9025f15c6edeb7ec670ca535b">More...</a><br /></td></tr>
<tr class="separator:a43ee85b9025f15c6edeb7ec670ca535b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f773ae0fc0c02843459790dad301263"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a8f773ae0fc0c02843459790dad301263.html#a8f773ae0fc0c02843459790dad301263">injectVirtualKey</a> (<a class="el" href="structfabgl_1_1_virtual_key_item.html">VirtualKeyItem</a> const &amp;item, bool insert=false)</td></tr>
<tr class="memdesc:a8f773ae0fc0c02843459790dad301263"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds or inserts a virtual key info into the virtual keys queue.  <a href="classfabgl_1_1_keyboard_a8f773ae0fc0c02843459790dad301263.html#a8f773ae0fc0c02843459790dad301263">More...</a><br /></td></tr>
<tr class="separator:a8f773ae0fc0c02843459790dad301263"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef1dd1399d92a09d1ed115911b563688"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_aef1dd1399d92a09d1ed115911b563688.html#aef1dd1399d92a09d1ed115911b563688">isKeyboardAvailable</a> ()</td></tr>
<tr class="memdesc:aef1dd1399d92a09d1ed115911b563688"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if keyboard has been detected and correctly initialized.  <a href="classfabgl_1_1_keyboard_aef1dd1399d92a09d1ed115911b563688.html#aef1dd1399d92a09d1ed115911b563688">More...</a><br /></td></tr>
<tr class="separator:aef1dd1399d92a09d1ed115911b563688"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad64abdda7b0ab92e15e23c602571e851"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_ad64abdda7b0ab92e15e23c602571e851.html#ad64abdda7b0ab92e15e23c602571e851">isVKDown</a> (<a class="el" href="group___enumerations_gad0e6e31d5953384be4ea987eb3923e02.html#gad0e6e31d5953384be4ea987eb3923e02">VirtualKey</a> virtualKey)</td></tr>
<tr class="memdesc:ad64abdda7b0ab92e15e23c602571e851"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the virtual keys status.  <a href="classfabgl_1_1_keyboard_ad64abdda7b0ab92e15e23c602571e851.html#ad64abdda7b0ab92e15e23c602571e851">More...</a><br /></td></tr>
<tr class="separator:ad64abdda7b0ab92e15e23c602571e851"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae07d4bbfd23897dc1225821077c8df2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_aae07d4bbfd23897dc1225821077c8df2.html#aae07d4bbfd23897dc1225821077c8df2">lock</a> (int timeOutMS)</td></tr>
<tr class="memdesc:aae07d4bbfd23897dc1225821077c8df2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets exclusive access to the device.  <a href="classfabgl_1_1_p_s2_device_aae07d4bbfd23897dc1225821077c8df2.html#aae07d4bbfd23897dc1225821077c8df2">More...</a><br /></td></tr>
<tr class="separator:aae07d4bbfd23897dc1225821077c8df2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50910ef42a65d4c139af341f1ef2323f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a50910ef42a65d4c139af341f1ef2323f.html#a50910ef42a65d4c139af341f1ef2323f">reset</a> ()</td></tr>
<tr class="memdesc:a50910ef42a65d4c139af341f1ef2323f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a Reset command to the keyboard.  <a href="classfabgl_1_1_keyboard_a50910ef42a65d4c139af341f1ef2323f.html#a50910ef42a65d4c139af341f1ef2323f">More...</a><br /></td></tr>
<tr class="separator:a50910ef42a65d4c139af341f1ef2323f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5e89fd1fac0904104dfab776e4fb15c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_ae5e89fd1fac0904104dfab776e4fb15c.html#ae5e89fd1fac0904104dfab776e4fb15c">resumePort</a> ()</td></tr>
<tr class="memdesc:ae5e89fd1fac0904104dfab776e4fb15c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resumes PS/2 port releasing CLK line.  <a href="classfabgl_1_1_p_s2_device_ae5e89fd1fac0904104dfab776e4fb15c.html#ae5e89fd1fac0904104dfab776e4fb15c">More...</a><br /></td></tr>
<tr class="separator:ae5e89fd1fac0904104dfab776e4fb15c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55976327987b5fa4942532e400d7480c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a55976327987b5fa4942532e400d7480c.html#a55976327987b5fa4942532e400d7480c">scancodeAvailable</a> ()</td></tr>
<tr class="memdesc:a55976327987b5fa4942532e400d7480c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of scancodes available in the queue.  <a href="classfabgl_1_1_keyboard_a55976327987b5fa4942532e400d7480c.html#a55976327987b5fa4942532e400d7480c">More...</a><br /></td></tr>
<tr class="separator:a55976327987b5fa4942532e400d7480c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac6f6dc99df5db0ee8bb96b4917022b6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_aac6f6dc99df5db0ee8bb96b4917022b6.html#aac6f6dc99df5db0ee8bb96b4917022b6">scancodeSet</a> ()</td></tr>
<tr class="memdesc:aac6f6dc99df5db0ee8bb96b4917022b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets current scancode set.  <a href="classfabgl_1_1_keyboard_aac6f6dc99df5db0ee8bb96b4917022b6.html#aac6f6dc99df5db0ee8bb96b4917022b6">More...</a><br /></td></tr>
<tr class="separator:aac6f6dc99df5db0ee8bb96b4917022b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a069efe90366fe5ca0c22eaf17a0e30fc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_a069efe90366fe5ca0c22eaf17a0e30fc.html#a069efe90366fe5ca0c22eaf17a0e30fc">sendCommand</a> (uint8_t cmd)</td></tr>
<tr class="memdesc:a069efe90366fe5ca0c22eaf17a0e30fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a raw command to the PS/2 device.  <a href="classfabgl_1_1_p_s2_device_a069efe90366fe5ca0c22eaf17a0e30fc.html#a069efe90366fe5ca0c22eaf17a0e30fc">More...</a><br /></td></tr>
<tr class="separator:a069efe90366fe5ca0c22eaf17a0e30fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cca4ba4bef3e1e010b7614be84323e3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_a2cca4ba4bef3e1e010b7614be84323e3.html#a2cca4ba4bef3e1e010b7614be84323e3">sendCommand</a> (uint8_t cmd, uint8_t expectedReply)</td></tr>
<tr class="memdesc:a2cca4ba4bef3e1e010b7614be84323e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a raw command to the PS/2 device and wait for reply.  <a href="classfabgl_1_1_p_s2_device_a2cca4ba4bef3e1e010b7614be84323e3.html#a2cca4ba4bef3e1e010b7614be84323e3">More...</a><br /></td></tr>
<tr class="separator:a2cca4ba4bef3e1e010b7614be84323e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1d99a6ef63ceea2bdf227fd7dc1c1af"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_ac1d99a6ef63ceea2bdf227fd7dc1c1af.html#ac1d99a6ef63ceea2bdf227fd7dc1c1af">setCodePage</a> (CodePage const *codepage)</td></tr>
<tr class="memdesc:ac1d99a6ef63ceea2bdf227fd7dc1c1af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets font codepage for virtual key to ASCII conversion.  <a href="classfabgl_1_1_keyboard_ac1d99a6ef63ceea2bdf227fd7dc1c1af.html#ac1d99a6ef63ceea2bdf227fd7dc1c1af">More...</a><br /></td></tr>
<tr class="separator:ac1d99a6ef63ceea2bdf227fd7dc1c1af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca97a7179d5358ec795485e15618b243"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_aca97a7179d5358ec795485e15618b243.html#aca97a7179d5358ec795485e15618b243">setLayout</a> (<a class="el" href="structfabgl_1_1_keyboard_layout.html">KeyboardLayout</a> const *layout)</td></tr>
<tr class="memdesc:aca97a7179d5358ec795485e15618b243"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets keyboard layout.  <a href="classfabgl_1_1_keyboard_aca97a7179d5358ec795485e15618b243.html#aca97a7179d5358ec795485e15618b243">More...</a><br /></td></tr>
<tr class="separator:aca97a7179d5358ec795485e15618b243"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99a84478b09fbb13863c3ec64f7ca872"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a99a84478b09fbb13863c3ec64f7ca872.html#a99a84478b09fbb13863c3ec64f7ca872">setLEDs</a> (bool numLock, bool capsLock, bool scrollLock)</td></tr>
<tr class="memdesc:a99a84478b09fbb13863c3ec64f7ca872"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets keyboard LEDs status.  <a href="classfabgl_1_1_keyboard_a99a84478b09fbb13863c3ec64f7ca872.html#a99a84478b09fbb13863c3ec64f7ca872">More...</a><br /></td></tr>
<tr class="separator:a99a84478b09fbb13863c3ec64f7ca872"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a600e8df9a742233bd074a2510be71cce"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a600e8df9a742233bd074a2510be71cce.html#a600e8df9a742233bd074a2510be71cce">setScancodeSet</a> (int value)</td></tr>
<tr class="memdesc:a600e8df9a742233bd074a2510be71cce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the scancode set.  <a href="classfabgl_1_1_keyboard_a600e8df9a742233bd074a2510be71cce.html#a600e8df9a742233bd074a2510be71cce">More...</a><br /></td></tr>
<tr class="separator:a600e8df9a742233bd074a2510be71cce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2f021a81df654389e62860afdb8f1de"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_af2f021a81df654389e62860afdb8f1de.html#af2f021a81df654389e62860afdb8f1de">setTypematicRateAndDelay</a> (int repeatRateMS, int repeatDelayMS)</td></tr>
<tr class="memdesc:af2f021a81df654389e62860afdb8f1de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets typematic rate and delay.  <a href="classfabgl_1_1_keyboard_af2f021a81df654389e62860afdb8f1de.html#af2f021a81df654389e62860afdb8f1de">More...</a><br /></td></tr>
<tr class="separator:af2f021a81df654389e62860afdb8f1de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a823914d949a5510b933dcfb335e36ab1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a823914d949a5510b933dcfb335e36ab1.html#a823914d949a5510b933dcfb335e36ab1">setUIApp</a> (<a class="el" href="classfabgl_1_1ui_app.html">uiApp</a> *app)</td></tr>
<tr class="memdesc:a823914d949a5510b933dcfb335e36ab1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets current UI app.  <a href="classfabgl_1_1_keyboard_a823914d949a5510b933dcfb335e36ab1.html#a823914d949a5510b933dcfb335e36ab1">More...</a><br /></td></tr>
<tr class="separator:a823914d949a5510b933dcfb335e36ab1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2516eb2086876de9d8abad203aea15c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_ac2516eb2086876de9d8abad203aea15c.html#ac2516eb2086876de9d8abad203aea15c">suspendPort</a> ()</td></tr>
<tr class="memdesc:ac2516eb2086876de9d8abad203aea15c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Suspends PS/2 port driving the CLK line Low.  <a href="classfabgl_1_1_p_s2_device_ac2516eb2086876de9d8abad203aea15c.html#ac2516eb2086876de9d8abad203aea15c">More...</a><br /></td></tr>
<tr class="separator:ac2516eb2086876de9d8abad203aea15c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9278be8203e1c42e2619179882ae4403"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_a9278be8203e1c42e2619179882ae4403.html#a9278be8203e1c42e2619179882ae4403">unlock</a> ()</td></tr>
<tr class="memdesc:a9278be8203e1c42e2619179882ae4403"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases device from exclusive access.  <a href="classfabgl_1_1_p_s2_device_a9278be8203e1c42e2619179882ae4403.html#a9278be8203e1c42e2619179882ae4403">More...</a><br /></td></tr>
<tr class="separator:a9278be8203e1c42e2619179882ae4403"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1da2800c551ac4fa0fe2f61915a8a2da"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a1da2800c551ac4fa0fe2f61915a8a2da.html#a1da2800c551ac4fa0fe2f61915a8a2da">virtualKeyAvailable</a> ()</td></tr>
<tr class="memdesc:a1da2800c551ac4fa0fe2f61915a8a2da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of virtual keys available in the queue.  <a href="classfabgl_1_1_keyboard_a1da2800c551ac4fa0fe2f61915a8a2da.html#a1da2800c551ac4fa0fe2f61915a8a2da">More...</a><br /></td></tr>
<tr class="separator:a1da2800c551ac4fa0fe2f61915a8a2da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa360795d47499669a2b42cc6a6d3ff7b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_aa360795d47499669a2b42cc6a6d3ff7b.html#aa360795d47499669a2b42cc6a6d3ff7b">virtualKeyToASCII</a> (<a class="el" href="group___enumerations_gad0e6e31d5953384be4ea987eb3923e02.html#gad0e6e31d5953384be4ea987eb3923e02">VirtualKey</a> virtualKey)</td></tr>
<tr class="memdesc:aa360795d47499669a2b42cc6a6d3ff7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts virtual key to ASCII.  <a href="classfabgl_1_1_keyboard_aa360795d47499669a2b42cc6a6d3ff7b.html#aa360795d47499669a2b42cc6a6d3ff7b">More...</a><br /></td></tr>
<tr class="separator:aa360795d47499669a2b42cc6a6d3ff7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a41c6325db16da56b81f05e8d9dcabd0e"><td class="memItemLeft" align="right" valign="top">Delegate&lt; <a class="el" href="group___enumerations_gad0e6e31d5953384be4ea987eb3923e02.html#gad0e6e31d5953384be4ea987eb3923e02">VirtualKey</a> *, bool &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a41c6325db16da56b81f05e8d9dcabd0e.html#a41c6325db16da56b81f05e8d9dcabd0e">onVirtualKey</a></td></tr>
<tr class="memdesc:a41c6325db16da56b81f05e8d9dcabd0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delegate called whenever a new virtual key is decoded from scancodes.  <a href="classfabgl_1_1_keyboard_a41c6325db16da56b81f05e8d9dcabd0e.html#a41c6325db16da56b81f05e8d9dcabd0e">More...</a><br /></td></tr>
<tr class="separator:a41c6325db16da56b81f05e8d9dcabd0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-attribs" name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a298b50557e15073b8bca4773f118f1dc"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_keyboard_a298b50557e15073b8bca4773f118f1dc.html#a298b50557e15073b8bca4773f118f1dc">scancodeToVirtualKeyTaskStackSize</a> = <a class="el" href="fabglconf_8h_ad5386d1d23edc7f81dc1c7362187e28d.html#ad5386d1d23edc7f81dc1c7362187e28d">FABGLIB_DEFAULT_SCODETOVK_TASK_STACK_SIZE</a></td></tr>
<tr class="memdesc:a298b50557e15073b8bca4773f118f1dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stack size of the task that converts scancodes to Virtual Keys <a class="el" href="classfabgl_1_1_keyboard.html" title="The PS2 Keyboard controller class.">Keyboard</a>.  <a href="classfabgl_1_1_keyboard_a298b50557e15073b8bca4773f118f1dc.html#a298b50557e15073b8bca4773f118f1dc">More...</a><br /></td></tr>
<tr class="separator:a298b50557e15073b8bca4773f118f1dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >The PS2 <a class="el" href="classfabgl_1_1_keyboard.html" title="The PS2 Keyboard controller class.">Keyboard</a> controller class. </p>
<p ><a class="el" href="classfabgl_1_1_keyboard.html" title="The PS2 Keyboard controller class.">Keyboard</a> connects to one port of the PS2 Controller class (<a class="el" href="classfabgl_1_1_p_s2_controller.html" title="The PS2 device controller class.">fabgl::PS2Controller</a>) and provides the logic that converts scancodes to virtual keys or ASCII (and ANSI) codes.<br  />
 It optionally creates a task that waits for scan codes from the PS2 device and puts virtual keys in a queue.<br  />
 The PS2 controller uses ULP coprocessor and RTC slow memory to communicate with the PS2 device.<br  />
 <br  />
 It is possible to specify an international keyboard layout. The default is US-layout.<br  />
 There are several predefined kayboard layouts: US (USA), UK (United Kingdom), DE (German), IT (Italian), ES (Spanish), FR (French), BE (Belgian) and NO (Norwegian). Other layout can be added inheriting from US or from any other layout.</p>
<p >Applications do not need to create an instance of <a class="el" href="classfabgl_1_1_keyboard.html" title="The PS2 Keyboard controller class.">Keyboard</a> because an instance named <a class="el" href="classfabgl_1_1_keyboard.html" title="The PS2 Keyboard controller class.">Keyboard</a> is created automatically.</p>
<p >Example: </p><pre class="fragment">fabgl::Keyboard Keyboard;

// Setup pins GPIO33 for CLK and GPIO32 for DATA
Keyboard.begin(GPIO_NUM_33, GPIO_NUM_32);  // clk, dat

// Prints name of received virtual keys
while (true)
  Serial.printf("VirtualKey = %s\n", Keyboard.virtualKeyToString(Keyboard.getNextVirtualKey()));
</pre> 
<p class="definition">Definition at line <a class="el" href="keyboard_8h_source.html#l00077">77</a> of file <a class="el" href="keyboard_8h_source.html">keyboard.h</a>.</p>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="keyboard_8h_source.html">keyboard.h</a></li>
<li><a class="el" href="keyboard_8cpp_source.html">keyboard.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>fabgl</b></li><li class="navelem"><a class="el" href="classfabgl_1_1_keyboard.html">Keyboard</a></li>
    <li class="footer">Generated on Mon Aug 29 2022 13:52:05 for FabGL by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
  </ul>
</div>
</body>
</html>
